<!DOCTYPE html>
<html>
  <head>
    <title>留言页面</title>
  </head>
  <body>
  <% if(loginname){ %>
          <div>
            <span><%=loginname%> 已登陆</span>
            <a href="/users/logout">退出</a>
          </div>
        <% }else{ %>
          <form  action="/users/login" method="post">
            <input type="text" name="loginname" value="">
            <input type="password" name="password" value="">
            <input type="submit" name="" value="登陆">
          </form>
          <form  action="/users/reg" method="post">
            <input type="text" name="loginname" value="">
            <input type="password" name="password" value="">
            <input type="password" name="confirm" value="">
            <input type="submit" name="" value="注册">
          </form>
        <% } %>

        <table style="width:100%">
          <tr>
            <td style="width:25%">标题</td>
            <td style="width:25%">留言人</td>
            <td style="width:50%">内容</td>
          </tr>
          <% fsreturnlist.forEach(item=>{  %>
            <tr>
              <td style="width:25%"><%= item.bt %></td>
              <td style="width:25%"><%= item.lyr %></td>
              <td style="width:50%"><%= item.nr %></td>
            <tr>
          <%  }) %>
        </table>

        <% if(loginname){ %>
          <form  action="/ly" method="post">
            <input type="text" name="bt" value="">
            <input type="text" name="nr" value="">
            <input type="submit" name="" value="添加留言">
          </form>
        <% } %>
      </body>
</html>
